As a storage capacity size of a computer system increases gradually, improvement of memory reliability is essential for running stability of the computer system. Currently, error-tolerant code is generally used in the industry to check data of memory, so as to improve memory reliability. Common error-tolerant coding methods include a single error correction-double error detection (SEC-DED) method, a Chipkill (a new memory protection technology developed by the IBM Corporation) method, a Bose, Chaudhuri, and Hocquenghem (BCH) error-tolerant coding method, a dual-mode mirror error-tolerant coding (MIRROR) method, and the like. When a specific running object (for example, an application program, a thread, a process, or a code segment) accesses memory under a condition, the memory can support, only if a suitable error-tolerant coding method is selected, correct access performed by the specific running object to corresponding data, that is, meet a memory reliability requirement of the specific running object. For memory in the prior art, a single error-tolerant coding method is generally used; correspondingly, when the memory is accessed, the single error-tolerant coding method of the memory is also used to check data. For example, in the prior art, an error-tolerant coding method used by memory is a SEC-DED method, where in a process of performing read access to data of an application program, first, error-tolerant code is used to perform error detection on read data, and error-correction code is used to perform error correction only after an error is detected.
The prior art has the following disadvantages: a single error-tolerant coding method is used, which cannot meet a reliability requirement for memory when different running objects access the memory under different conditions.